package com.SouthernWall_404.age_tool.Client;

import com.SouthernWall_404.age_tool.AgeTool;
import com.SouthernWall_404.age_tool.Client.Gui.Screen.MusicBlockScreen;
import com.SouthernWall_404.age_tool.Client.Render.MimicBlockRenderer;
import com.SouthernWall_404.age_tool.common.init.ModBlockEntities;
import com.SouthernWall_404.age_tool.common.init.ModBlocks;
import com.SouthernWall_404.age_tool.common.init.ModMenuType;
import net.minecraft.client.gui.screens.MenuScreens;
import net.minecraft.client.renderer.ItemBlockRenderTypes;
import net.minecraft.client.renderer.RenderType;
import net.minecraft.client.renderer.blockentity.BlockEntityRenderers;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.eventbus.api.IEventBus;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;

@Mod.EventBusSubscriber(modid = AgeTool.MODID,bus = Mod.EventBusSubscriber.Bus.MOD,value = Dist.CLIENT)
public class AgeBayonetClient {

    @SubscribeEvent
    public static void onClientSetUp(FMLClientSetupEvent event)
    {
        IEventBus modEventBus = FMLJavaModLoadingContext.get().getModEventBus();
        MenuScreens.register(ModMenuType.MUSIC_BLOCK_MENU.get(), MusicBlockScreen::new);
    }

    @SubscribeEvent
    public static void onClientSetup(FMLClientSetupEvent event) {
        event.enqueueWork(() -> {
            BlockEntityRenderers.register(
                    ModBlockEntities.TRIGGER_BLOCK_ENTITY.get(),
                    (a)->new MimicBlockRenderer(a));
//            );
        });
    }


}
